package com.augurit.wf.common.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.augurit.common.base.dao.BaseDao;
import com.augurit.wf.common.entity.WfAgency;

@Repository
public class WfAgencyDao extends BaseDao<WfAgency, Long> {
	
	//根据代理人获取委托人列表
	public List<String> getPrincipalsByAgent(String agent){
		List<String> list = null;
		if(agent != null && agent.trim().length()>0){
			String hql = " select ps.principal from WfAgency ps where ps.agent='" + agent + "'";
			list = this.find(hql);
		}
		return list;
	}
}